﻿package keyfun.events
{
	import flash.events.Event;
	
	public class ImageLoaderEvent extends Event
	{
		public static const ON_COMPLETE:String = "on_image_complete";
		public static const ON_LOADING:String = "on_image_loading";
		public static const ON_ERROR:String = "on_image_error";
		
		public var bytesLoaded:Number;
		public var bytesTotal:Number;
		
		public function ImageLoaderEvent(type:String, pBytesLoaded:Number=0, pBytesTotal:Number=0) 
		{
			super(type);

			switch(type)
			{
				case ON_COMPLETE:
				break;
				
				case ON_LOADING:
				bytesLoaded = pBytesLoaded;
				bytesTotal = pBytesTotal;
				break;
			}
		}
	}
}